package com.haixinga.commbiz.commons.constants;

/**
 * @Author terrfly
 * @Date 2020/2/13 13:05
 * @Description TODO
 **/
public enum ApiCodeEnum{

    SUCCESS(0, "OK"), //请求成功

    CUSTOM_FAIL(9999, "自定义业务异常"),  //自定义业务异常

    SYSTEM_ERROR(10, "系统异常[%s]"),
    PARAMS_ERROR(11, "参数有误[%s]");


    private int code;
    private String msg;

    ApiCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
